﻿----------------------------------------------------------------------------------------------------
--
--  © 2012 Stanislav S. Yarmonov.
--
--  TODO:LICENSE
--     
----------------------------------------------------------------------------------------------------
CREATE TABLE [_DB].[LogType] (
	-- Log type identifier.
	[ID] [int] IDENTITY(1,1) NOT NULL,

	-- Log type name.
	[Name] [varchar](127) NOT NULL,

	-- Log type descriptiotn.
	[Description] [nvarchar](max) NULL
)
GO

-- Primary key -------------------------------------------------------------------------------------
ALTER TABLE
	[_DB].[LogType]
ADD CONSTRAINT
	[PK_DB_LogType]
PRIMARY KEY NONCLUSTERED (
	[ID] ASC
)
GO

-- Unique clustere index for name ------------------------------------------------------------------
CREATE UNIQUE CLUSTERED INDEX
	[UX_DB_LogType_Name]
ON [_DB].[LogType] (
	[Name] ASC
)
GO
